import * as types from './mutations_types';
module.exports = {
    [types.QUERY_BASIC_INFO](state, data) {
        state.basicInfo = data || {};
    },
    [types.FOLLOWING_RECORD_LIST](state, data) {
        state.trackInfoListAll = data.TrackInfoList || [];
    },
    [types.QUERY_STUTRACKLIST](state, data) {
        state.trackList = data.list || [];
        state.trackTotal = data.total || '';
        state.nextTimeRed = data.nextTimeRed || '';
    },
    [types.UPDATE_PAGE](state, data) {
        state.trackPage = data || state.trackPage;
    },
    [types.ADD_FOL_RECORD](state, data) {
        state.trackInfoListAll.push(data);
    },
    [types.RESUME_LIST](state, data) {
        state.resumeList = data.list || [];
        state.resumeTotal = data.total || '';
    },
    [types.QUERY_TRACKNUM](state, data) {
        state.trackNum = data;
    },
    [types.ADD_STU_INFO](state, data) {
        state.stuInfoConstantAct = data || {};
        // state.stuInfoConstantAct.map((key, value) => {
        //     key.value = '';
        // });
        for (let key in state.stuInfoConstantAct) {
            state.stuInfoConstantAct[key].value = '';
        };
    },
    [types.OPTION_STATUS](state, data) {
        state.optionalStatus = data.NextStatus || [];
    },
    [types.QUERY_PERSON](state, data) {
        state.queryPersons = data || [];
    },
    [types.THE_QUESTIONS](state, data) {
        state.payInfo = data.payInfo || {};
        state.refundInfo = data.refundInfo || {};
        state.questions = data.logicTests || [];
        state.currentRoleTel = data.currentRoleTel || '';
        state.breakButton = data.breakAppointmentsButtonAvailable || '';
    },
    [types.PAYMENT_DATA](state, data) {
        state.paymentData = data;
    },
    [types.UPDATE_TRACKSTATUSF](state, data) {
        state.trackQuery = data || null;
    },
    [types.CONSULTING_LIST](state, data) {
        state.consultingList = data || [];
    },
    [types.CONSULTING_ECHARTS](state, data) {
        state.consultingEcharts = data || [];
    },
    [types.BREAK_APPOINTMENT](state, data) {
        state.breakAppointments = data || [];
    }
};